package LanQiao._14JavaB;

public class _2阶乘求和 {

    public static void main(String[] args) {
        int n = 70;
        double res = 0;
        for (int i = 1; i <= n; i++) {
            double help = help(i);
            res += help;
        }
        System.out.println(res);
    }

    public static double help(int num){
        double sum = 1;
        for(int i = 2; i <= num; i++){
            sum *= i;
            sum %= 1000000000;
        }
        return sum;
    }

}
